Optimal. Leaf size=67 \[ -\frac {1}{2} \sqrt {b} e^{-a} \sqrt {\pi } \text {Erf}\left (\frac {\sqrt {b}}{x}\right )-\frac {1}{2} \sqrt {b} e^a \sqrt {\pi } \text {Erfi}\left (\frac {\sqrt {b}}{x}\right )+x \sinh \left (a+\frac {b}{x^2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {5410, 5434,
5407, 2235, 2236} \begin {gather*} -\frac {1}{2} \sqrt {\pi } e^{-a} \sqrt {b} \text {Erf}\left (\frac {\sqrt {b}}{x}\right )-\frac {1}{2} \sqrt {\pi } e^a \sqrt {b} \text {Erfi}\left (\frac {\sqrt {b}}{x}\right )+x \sinh \left (a+\frac {b}{x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2235
Rule 2236
Rule 5407
Rule 5410
Rule 5434
Rubi steps
\begin {align*} \int \sinh \left (a+\frac {b}{x^2}\right ) \, dx &=-\text {Subst}\left (\int \frac {\sinh \left (a+b x^2\right )}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=x \sinh \left (a+\frac {b}{x^2}\right )-(2 b) \text {Subst}\left (\int \cosh \left (a+b x^2\right ) \, dx,x,\frac {1}{x}\right )\\ &=x \sinh \left (a+\frac {b}{x^2}\right )-b \text {Subst}\left (\int e^{-a-b x^2} \, dx,x,\frac {1}{x}\right )-b \text {Subst}\left (\int e^{a+b x^2} \, dx,x,\frac {1}{x}\right )\\ &=-\frac {1}{2} \sqrt {b} e^{-a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt {b}}{x}\right )-\frac {1}{2} \sqrt {b} e^a \sqrt {\pi } \text {erfi}\left (\frac {\sqrt {b}}{x}\right )+x \sinh \left (a+\frac {b}{x^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 70, normalized size = 1.04 \begin {gather*} x \cosh \left (\frac {b}{x^2}\right ) \sinh (a)-\frac {1}{2} \sqrt {b} \sqrt {\pi } \left (\text {Erf}\left (\frac {\sqrt {b}}{x}\right ) (\cosh (a)-\sinh (a))+\text {Erfi}\left (\frac {\sqrt {b}}{x}\right ) (\cosh (a)+\sinh (a))\right )+x \cosh (a) \sinh \left (\frac {b}{x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 70, normalized size = 1.04
method | result | size |
risch | \(-\frac {\sqrt {\pi }\, \erf \left (\frac {\sqrt {b}}{x}\right ) {\mathrm e}^{-a} \sqrt {b}}{2}-\frac {{\mathrm e}^{-a} {\mathrm e}^{-\frac {b}{x^{2}}} x}{2}+\frac {{\mathrm e}^{a} {\mathrm e}^{\frac {b}{x^{2}}} x}{2}-\frac {{\mathrm e}^{a} b \sqrt {\pi }\, \erf \left (\frac {\sqrt {-b}}{x}\right )}{2 \sqrt {-b}}\) | \(70\) |
meijerg | \(\frac {i \sqrt {\pi }\, \cosh \left (a \right ) \sqrt {2}\, \sqrt {i b}\, \left (\frac {2 x \sqrt {2}\, \sqrt {i b}\, {\mathrm e}^{-\frac {b}{x^{2}}}}{\sqrt {\pi }\, b}-\frac {2 x \sqrt {2}\, \sqrt {i b}\, {\mathrm e}^{\frac {b}{x^{2}}}}{\sqrt {\pi }\, b}+\frac {2 \sqrt {i b}\, \sqrt {2}\, \erf \left (\frac {\sqrt {b}}{x}\right )}{\sqrt {b}}+\frac {2 \sqrt {i b}\, \sqrt {2}\, \erfi \left (\frac {\sqrt {b}}{x}\right )}{\sqrt {b}}\right )}{8}-\frac {\sqrt {\pi }\, \sinh \left (a \right ) \sqrt {2}\, \sqrt {i b}\, \left (-\frac {2 x \sqrt {2}\, {\mathrm e}^{\frac {b}{x^{2}}}}{\sqrt {\pi }\, \sqrt {i b}}-\frac {2 x \sqrt {2}\, {\mathrm e}^{-\frac {b}{x^{2}}}}{\sqrt {\pi }\, \sqrt {i b}}-\frac {2 \sqrt {2}\, \sqrt {b}\, \erf \left (\frac {\sqrt {b}}{x}\right )}{\sqrt {i b}}+\frac {2 \sqrt {2}\, \sqrt {b}\, \erfi \left (\frac {\sqrt {b}}{x}\right )}{\sqrt {i b}}\right )}{8}\) | \(217\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 71, normalized size = 1.06 \begin {gather*} -\frac {1}{2} \, b {\left (\frac {\sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {\frac {b}{x^{2}}}\right ) - 1\right )} e^{\left (-a\right )}}{x \sqrt {\frac {b}{x^{2}}}} + \frac {\sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-\frac {b}{x^{2}}}\right ) - 1\right )} e^{a}}{x \sqrt {-\frac {b}{x^{2}}}}\right )} + x \sinh \left (a + \frac {b}{x^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 228 vs.
\(2 (49) = 98\).
time = 0.41, size = 228, normalized size = 3.40 \begin {gather*} \frac {x \cosh \left (\frac {a x^{2} + b}{x^{2}}\right )^{2} + \sqrt {\pi } {\left (\cosh \left (a\right ) \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) + \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) \sinh \left (a\right ) + {\left (\cosh \left (a\right ) + \sinh \left (a\right )\right )} \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )\right )} \sqrt {-b} \operatorname {erf}\left (\frac {\sqrt {-b}}{x}\right ) - \sqrt {\pi } {\left (\cosh \left (a\right ) \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) - \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) \sinh \left (a\right ) + {\left (\cosh \left (a\right ) - \sinh \left (a\right )\right )} \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )\right )} \sqrt {b} \operatorname {erf}\left (\frac {\sqrt {b}}{x}\right ) + 2 \, x \cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) \sinh \left (\frac {a x^{2} + b}{x^{2}}\right ) + x \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )^{2} - x}{2 \, {\left (\cosh \left (\frac {a x^{2} + b}{x^{2}}\right ) + \sinh \left (\frac {a x^{2} + b}{x^{2}}\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sinh {\left (a + \frac {b}{x^{2}} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \mathrm {sinh}\left (a+\frac {b}{x^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________